/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 头部样式 */
header {
    padding: 20px;
    background-color: #4a6fa5;
    color: white;
}

header h1 {
    margin-bottom: 15px;
    text-align: center;
}

.input-group {
    display: flex;
    gap: 10px;
}

#taskInput {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
}

#addTaskBtn {
    padding: 12px 20px;
    background-color: #2c3e50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

#addTaskBtn:hover {
    background-color: #1a252f;
}

/* 主内容区域 */
main {
    padding: 20px;
}

.filters {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 10px;
}

.filter-btn {
    padding: 8px 16px;
    background-color: #f0f0f0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active, .filter-btn:hover {
    background-color: #4a6fa5;
    color: white;
}

/* 任务列表样式 */
.task-list {
    margin-bottom: 20px;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.task-item:hover {
    background-color: #f9f9f9;
}

.task-checkbox {
    margin-right: 15px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.task-text {
    flex: 1;
    font-size: 16px;
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: #888;
}

.task-delete {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.task-delete:hover {
    opacity: 1;
}

/* 统计区域 */
.stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
    color: #666;
}

#clearCompleted {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    text-decoration: underline;
}

#clearCompleted:hover {
    color: #e74c3c;
}

/* 空状态提示 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.empty-state.hidden {
    display: none;
}

/* 响应式设计 */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .filters {
        flex-wrap: wrap;
    }
    
    .stats {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}